package cn.study.vue_project_xxx.util;

import cn.study.vue_project_xxx.common.exception.KnowException;

public class InstanceFactoryUtil {
    public static <T> T getInstance(Class<T> inputType){
        try {
            return inputType.newInstance();
        } catch (InstantiationException | IllegalAccessException e) {
            throw new KnowException(e.getMessage());
        }
    }
}
